<template>
  <div class="person-center">
    <ul>
      <li><router-link to="/hello">我的资料</router-link></li>
      <li>我的订单</li>
    </ul>
    <!--滑动区域-->
		<div id="mescroll" class="mescroll">
			<!--展示上拉加载的数据列表-->
			<ul id="newsList" class="news-list">
				<!--模拟的内容-->

			</ul>
		</div>
  </div>
</template>

<script>
export default {
  name: 'PersonCenter',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
    }
  },
  mounted() {
    common.ajax({url:'/rest-web/common/user/login?username=15258239163&password=123456'})
    common.mpaginate({
      url:'/rest-web/web/enter/search',
      callback:function (list) {
        var newsList = document.getElementById('newsList');
        var html = '';
        for (var i = 0; i < list.length; i++) {
          html +=
          `<li>
            <p>【微博append】标题标题标题标题</p>
            <p class="new-content">内容内容内容内容内容内容内容内容内容</p>
           </li>`
        }
        newsList.innerHTML = html;
        console.log(list);
      }
    });
  },
  methods:{
    test() {
      var a = () => 1;
      alert(1)
    }
  }
}
</script>
<style>
  /*列表*/
  .mescroll{
    height: 300px;
    width: 100%;
    background-color: #f7f7f7;
  }
</style>
